﻿using DeZhen.Core.Framework.Business.Ioc;
using DeZhen.Core.Framework.Entity;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Text;

namespace DeZhen.Core.Framework.Logger
{
    //[Service(ServiceLifetime.Singleton)]
    public class LoggerClient<T> : ILoggerClient<T>
    {
        [Autowired]
        private ILogger<T> _logger;
        public LoggerClient(IAutowiredPlatform autowiredPlatform)
        {
            autowiredPlatform.Autowired(this);
        }
        private void LogInfo(object message)
        {
            _logger.LogInformation(message.ToString());
        }
        private void LogError(object message)
        {
            _logger.LogError(message.ToString());
        }
        private void LogWarning(object message)
        {
            _logger.LogWarning(message.ToString());
        }
        private void LogDebug(object message)
        {
            _logger.LogDebug(message.ToString());
        }
    }
}
